#include <memory>
#include "server.hpp"

void usage(char *agr) {
    cout << "Usage: " << agr << " <port>" << endl;
    exit(EXIT_FAILURE);
}

int main(int argc, char *argv[]) {
    if(argc != 2) {
        usage(argv[0]);
    }
    uint16_t port = atoi(argv[1]);
    unique_ptr<server> svr(new server(port));
    svr->init();
    svr->start();
    return 0;
}